#include <stdio.h>
#include <math.h>
#include <stdlib.h>

#include "../headers/Structs.h"

int randomi(int max1, int min1, int min2, int max2)
{
	int random = rand() % ((max2 - max1) + 1) + max1;
	if (random > min1 && random < min2)
		random = randomi(max1, min1, min2, max2);
	return random;
}

void DebugOut(float num)
{
	FILE* out = fopen("debug.txt", "a");
	fprintf(out, "%f\n", num);
	fclose(out);
}

void DebugOut(unsigned int time)
{
	static unsigned int last = 0;
	
	FILE* out = fopen("debug.txt", "a");
	fprintf(out, "ms: %d\n", time - last);
	fclose(out);
	last = time;
}

void DebugOut(char* num)
{
	FILE* msgfile = fopen("debug.txt", "a");
	
	fprintf(msgfile, "%s\n", num);
	fclose(msgfile);
}

double Length(float x1, float y1, float z1, float x2, float y2, float z2)
{
	
}
